package com.sh.bean;

public class Camera {
    private String brand;
    private int megapixels;

    public Camera() {}

    public Camera(String brand, int megapixels) {
        this.brand = brand;
        this.megapixels = megapixels;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getMegapixels() {
        return megapixels;
    }

    public void setMegapixels(int megapixels) {
        this.megapixels = megapixels;
    }

    public void takePhoto() {
        System.out.println("📷 使用 " + brand + " 相机拍摄，像素：" + megapixels + "MP");
    }
}
